const Express = require('express')
const Path = require('path')

let router = Express.Router()


/**
 *  登录
 *  @post
 *  in: user&password       //default: superadmin/admin
 *  out: {
 *          rc: 0,      //0-成功 !0-则表示失败
 *          desc: '',
 *          data: {    //只有当rc==0的时候才会有值
 *              name: '',
 *              arg: '',
 *              avatar: '',     
 *              per: 0 ,        //权限
 *          }
 *      }
 */
router.get('/login', (req, res)=>{
    res.render(Path.join(__dirname, '/views', 'login'), {
        username: 'test',
        password: '123456'
    })
})


/**
 * 
 *  登出
 *  待定
 */

/**
 *  注册
 *  in:  {
 *          user: '',
 *          password: '',
 *          nickname: '',
 *          aavatar: '',
 *      }
 */





module.exports = router